//
//  ZZP_BaseViewController.m
//  A段_旅游_兜兜风
//
//  Created by dllo on 15/9/9.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ZZP_BaseViewController.h"
#import "YRSideViewController.h"
@interface ZZP_BaseViewController ()

@end

@implementation ZZP_BaseViewController
// 创建navConBar
- (void)navBar
{
    // 设置bar的颜色
    self.navigationController.navigationBar.barTintColor = ColorWithNavtionBar;
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button addTarget:self action:@selector(drawActionOne:) forControlEvents:UIControlEventTouchUpInside];
    
    button.frame = CGRectMake(0, 0, 20, 20);
    button.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
    UIBarButtonItem *left = [[UIBarButtonItem alloc] initWithCustomView:button];
    self.navigationItem.leftBarButtonItem = left;

    // nav字体颜色
    [self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
    
    // nav字体大小
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:FontWithNavtionBar}];
}

- (void)drawActionOne:(UIButton *)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.interactivePopGestureRecognizer.delegate = (id)self;
    [self navBar];
 
   
}

- (void)viewWillAppear:(BOOL)animated
{
//    AppDelegate *delegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
//    YRSideViewController *sideViewController = [delegate mySideViewController];
//    
//    [sideViewController setNeedSwipeShowMenu:NO];
//    sideViewController.needSwipeShowMenu = NO;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
